@import "animate";

$cdn-prefix: '';
/* 
example 
@include img('/static/img/img.png', )
 */
@mixin img($img, $width: 100%, $height: 100%, $left: auto, $top: auto, $pos: left top, $size: 100% 100%, $z: 0, $b: null) {
  position: absolute;
  @if $img != '' {
    background: $b url($cdn-prefix + $img) no-repeat $pos / $size;
  }
  left: $left;
  top: $top;
  width: $width;
  height: $height;
  z-index: $z;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  @if $left == center {
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
  }
  @if $top == center {
    top: 0;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
  }
}

@mixin bg ($url) {
  width: 100%;
  height: 100%;
  background: url($url) no-repeat center / 100% 100%;
}
